package marketplace.web.facebook;

import java.io.IOException;

import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import marketplace.ejb.interfaces.IUsuarioEJB;

public class LogoutServlet extends HttpServlet {
    private static final long serialVersionUID = 5357658337449255998L;

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	/*
    	try {
			PostServlet ps = (PostServlet) new InitialContext().lookup("java:global/Marketplace/MarketWEB/PostServlet");
			ps.setLogueadoFacebook(false);
		} catch (NamingException e) {
			e.printStackTrace();
		}    	*/
        request.getSession().invalidate();
        response.sendRedirect(request.getContextPath()+ "/");
    }
}
